package com.qianxunclub.chapter12;

import java.util.Arrays;
import java.util.List;

public class StreamTest {
    public static void main(String[] args) {

        List<String> list= Arrays.asList(new String[]{"c", "h", "a"});

        int[] arr={5,2,8,1,9};
        Arrays.parallelSort(arr);
        Arrays.stream(arr).forEach(i-> System.out.print(i));

        list.stream().forEach(i-> System.out.println(i+"~~~~~~"+Thread.currentThread().getName()));
        list.parallelStream().forEach(i-> System.out.println(i+"-----"+Thread.currentThread().getName()));
    }
}
